<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>音频装置监测</title>
    <link rel="icon" href="../static/img/icon.png">
    <link rel="stylesheet" href="../static/js/layui/css/layui.css">
    <link rel="stylesheet" href="../static/css/animate.min.css">
    <link rel="stylesheet" href="../static/css/style.css">
    <style>
        #audio-offset,
        #operate-offset {
            display: flex;
            flex-direction: column;
        }

        #audio-offset .layui-table-view,
        #operate-offset .layui-table-view {
            margin: 0;
            height: 100%;
        }

        #audio-offset .layui-table td,
        #operate-offset .layui-table td,
        .layui-table th {
            font-size: 0.18rem;
        }

        #audio-offset .layui-table-header,
        #operate-offset .layui-table-header {
            background: #0b3444;
        }

        #audio-offset .layui-table-header .layui-table,
        #operate-offset .layui-table-header .layui-table {
            color: #40e4ff;
        }

        #table-tool-form,
        #table-operate-form {
            display: flex;
            color: #ccc;
            height: 0.8rem;
            align-items: center;
            width: 98%;
            margin-left: 1%;

            input {
                width: 2.4rem;
            }
        }

        .layui-table-tool-temp {
            padding: 0;
        }

        .layui-table-tool-self {
            display: none;
        }

        .layui-form-radio>.lay-skin-tag,
        .layui-form-checkbox>.lay-skin-tag {
            font-size: 0.18rem;
        }

        .layui-form-checked>.lay-skin-tag,
        .layui-form-radioed>.lay-skin-tag {
            color: #fff !important;
            background-color: #16b777 !important;
        }

        #audio-form {
            .layui-upload-choose {
                position: absolute;
                top: 0.15rem;
                color: #fff;
                font-size: 0.16rem;
            }
        }

        #operateHorn-form {
            .form-item {
                height: 0.56rem;
            }

            .layui-badge {
                color: #ddd;
            }

        }

        .layui-layer:has(#operateHorn-form) {
            background-color: #1b3f46;
            background-image: linear-gradient(#1B3F46,#112937);
        }

        .layui-layer-page .layui-layer-content:has(#operateHorn-form) {
            overflow: inherit;
        }
    </style>

</head>

<body>
    <div class="app" style="overflow: hidden;">
        <div class="header animate__animated animate__slideInDown">
            <div class="header-title">训战研判系统平台</div>
            <div class="header-menu">

            </div>
        </div>
        <div class="contain">
            <div class="contain-menu animate__animated animate__slideInLeft">

            </div>
            <div class="contain-table">
                <div class="contain-table-tool">
                    <form class="layui-form" action=""
                        style="background: linear-gradient(to right, rgba(0,0,0,0),rgba(2, 36, 55,0.8));padding-left: 0.05rem;">
                        <div class="form-item">
                            <input type="text" name="nameOrEuid" placeholder="名称或设备号" class="layui-input"
                                lay-affix="clear" />
                        </div>
                        <select name="status" lay-filter="status">
                            <option value="">状态</option>
                            <option value="1">播放</option>
                            <option value="2">停止</option>
                        </select>
                        <div class="layui-btn" lay-submit lay-filter="search"><img src="../static/img/icon2.png">查询
                        </div>
                        <div class="layui-btn table-edit add" onclick="operateHorn(0)">
                            <i class="layui-icon layui-icon-speaker"></i>播放
                        </div>
                        <div class="layui-btn table-del" onclick="operateHorn(5)" style="margin: 0;">
                            <i class="layui-icon layui-icon-mute"></i>停止
                        </div>
                        <div class="layui-btn add" onclick="queryAudio()" style="margin: 0 0 0 0.5rem;"><i
                                class="layui-icon layui-icon-headset"></i>音频管理
                        </div>
                        <div class="layui-btn add" onclick="operateTable()" style="margin: 0 0 0 0.1rem;">
                            <i class="layui-icon layui-icon-list"></i>操作日志
                        </div>
                        <button type="reset" id="resetSearch"
                            class="layui-btn layui-btn-primary btn-reset layui-hide">重置</button>
                    </form>
                </div>
                <div class="contain-table-list">
                    <table id="table" lay-filter="table"></table>
                </div>
            </div>
            <script type="text/html" id="table-tool">
                    <form class="layui-form" id="table-tool-form">
                        <div class="form-item">
                            <input type="text" name="name" placeholder="名称" class="layui-input"
                                lay-affix="clear" />
                        </div>
                        <div class="form-item">
                            <input type="text" name="code" placeholder="编号" class="layui-input"
                                lay-affix="clear" />
                        </div>
                        <select name="format" lay-filter="format">
                            <option value="">格式</option>
                            <option value=".mp3">mp3</option>
                            <option value=".wav">wav</option>
                            <option value=".amr">amr</option>
                            <option value=".pcm">pcm</option>
                        </select>
                        <select name="status" lay-filter="tool-status">
                            <option value="">全部</option>
                            <option value=1>启用</option>
                            <option value=2>停用</option>
                        </select>
                        <div class="form-item">
                            <input type="text" style="width: 3rem;" class="layui-input" name="history_date" id="history-date"  lay-affix="clear" placeholder="请选择时间范围">
                        </div>
                        <div class="layui-btn" lay-submit lay-filter="searchAudio"><img src="../static/img/icon2.png">查询
                        </div>
                        <div style="display: flex;margin: 0 0 0 auto;">
                            <div onclick="opAudio(1)" class="layui-btn table-record"><i class="layui-icon layui-icon-templeate-1"></i>一键同步
                            </div>
                            <div onclick="opAudio(2)" class="layui-btn table-edit"><i class="layui-icon layui-icon-upload-drag"></i>上传音频
                            </div>
                            <div onclick="opAudio(3)" class="layui-btn table-del"><i class="layui-icon layui-icon-delete"></i>批量删除
                            </div>
                        </div>
                    </form>
                    <table id="record-table" lay-filter="record-table"></table>
            </script>
            <script type="text/html" id="switchTpl">
                <input type="checkbox" name="status" value="{{d.id}}" lay-skin="switch" lay-text="启用|停用" lay-filter="table-status"
                    {{ d.status==1 ? 'checked' : '' }}>
            </script>
            <script type="text/html" id="table-operate">
                <form class="layui-form" id="table-operate-form">
                    <div class="form-item">
                        <input type="text" name="name" placeholder="名称" class="layui-input"
                            lay-affix="clear" />
                    </div>
                    <div class="form-item">
                        <input type="text" name="code" placeholder="设备号" class="layui-input"
                            lay-affix="clear" />
                    </div>
                    <div class="form-item">
                        <input type="text" style="width: 3rem;" class="layui-input" name="operate_date" id="operate-date"  lay-affix="clear" placeholder="请选择时间范围">
                    </div>
                    <div class="layui-btn" lay-submit lay-filter="searchOperate"><img src="../static/img/icon2.png">查询
                    </div>
                </form>
                <table id="operate-table" lay-filter="operate-table"></table>
            </script>
        </div>
    </div>



    <script type="text/javascript" src="../static/js/util/jquery.min.js"></script>
    <script type="text/javascript" src="../static/js/biz/app.js"></script>
    <script type="text/javascript" src="../static/js/layui/layui.js"></script>
    <script type="text/javascript" src="../static/js/biz/audioDevice.js"></script>
</body>

</html>